<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>datetime::DateTimeService</title>
  <meta http-equiv='Content-type' content='text/html;charset=UTF-8' />
  <link rel='stylesheet' type='text/css' href='../style.css'/>
</head>
<body>
<p>
  <a href='../index.html'>
    <img src='../logo.png' alt='Sedona'/>
  </a>
</p>
<div class='nav'>
  <a href='../index.html'>Index</a> |
  <a href='../api.html'>Kits</a> |
  <a href='index.html'>datetime</a>
</div>
<h1 class='title'>datetime::DateTimeService</h1>
<hr/>
<pre class='inheritance'><a href='../sys/Obj.html'>sys::Obj</a>
  <a href='../sys/Virtual.html'>sys::Virtual</a>
    <a href='../sys/Component.html'>sys::Component</a>
      <a href='../sys/Service.html'>sys::Service</a>
        datetime::DateTimeService
</pre>
<em>public </em> class <b>DateTimeService</b>  <br>
<hr/>
<p>DateTimeService is used to manage the system clock.&#xa;It also stores the current time which is automatically&#xa;updated each second.</p>
<hr/>
<dl>
<dt>day</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>byte day</b>

</code></p>
<p>Day of month</p>
</dd>
<dt>dayOfWeek</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>byte dayOfWeek</b>

</code></p>
<p>Day of week (see also datetime::DayOfWeek)</p>
</dd>
<dt>dt</dt>
<dd><p class='sig'><code><em><em>protected</em> <em>inline</em> </em><b><a href='../datetime/DateTime.html'>DateTime</a> dt</b>

</code></p>
</dd>
<dt>getUtcOffset</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> </em><b>int getUtcOffset()</b>

</code></p>
<p>Return the current UTC offset in seconds, including adjustment for&#xa;daylight savings time if necessary</p>
</dd>
<dt>hour</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>byte hour</b>

</code></p>
<p>Hour, adjusted for UTC offset</p>
</dd>
<dt>lastRefreshTicks</dt>
<dd><p class='sig'><code><em><em>public</em> </em><b>long lastRefreshTicks</b>

</code></p>
</dd>
<dt>log</dt>
<dd><p class='sig'><code><em><em>public</em> <em>static</em> <em>const</em> <em>define</em> </em><b><a href='../sys/Log.html'>Log</a> log</b>

</code></p>
</dd>
<dt>minute</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>byte minute</b>

</code></p>
<p>Minute</p>
</dd>
<dt>month</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>byte month</b>

</code></p>
<p>Month of year (see also datetime::Month)</p>
</dd>
<dt>nanos</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>long nanos</b> [unit=&#x22;nanosecond&#x22;]

</code></p>
<p>Nanos since epoch</p>
</dd>
<dt>now</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> </em><b>long now()</b>

</code></p>
<p>Return the current UTC date/time on the system in nanoseconds, or </p>
<pre class='doc'> DateTime.invalid if not supported, i.e. platform does not have clock&#xa; capability</pre>
</dd>
<dt>osUtcOffset</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>bool osUtcOffset</b> [config]

</code></p>
<p>If true, then the utcOffset is controlled by the &#xa;operating system.  If false then the utcOffset is &#xa;configured strictly by Sedona.</p>
</dd>
<dt>refresh</dt>
<dd><p class='sig'><code><em><em>public</em> <em>action</em> </em><b>void refresh()</b>

</code></p>
<p>Refreshes all property fields with current value</p>
</dd>
<dt>second</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>byte second</b>

</code></p>
<p>Second</p>
</dd>
<dt>setClock</dt>
<dd><p class='sig'><code><em><em>protected</em> <em>virtual</em> </em><b>void setClock(long nanos)</b>

</code></p>
<p>Set the system clock to the given UTC value.  May</p>
<pre class='doc'> not be supported on all platform.</pre>
</dd>
<dt>setSysClock</dt>
<dd><p class='sig'><code><em><em>public</em> <em>action</em> </em><b>void setSysClock(long nanos)</b>

</code></p>
<p>Sets the system clock and refreshes properties.  May not</p>
<pre class='doc'> be supported on all properties</pre>
</dd>
<dt>start</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> <em>override</em> </em><b>void start()</b>

</code></p>
<p>Callback when component first started</p>
</dd>
<dt>tz</dt>
<dd><p class='sig'><code><em><em>public</em> <em>inline</em> <em>property</em> </em><b><a href='../sys/Buf.html'>Buf</a> tz</b> [asStr, config, max=32]

</code></p>
<p>Olsen timezone identifier such as &#x22;America/New_York&#x22;.&#xa;This property is purely extra informational meta-data to &#xa;help tools interpret the utcOffset property.</p>
</dd>
<dt>updateProperties</dt>
<dd><p class='sig'><code><em><em>protected</em> </em><b>void updateProperties(long n)</b>

</code></p>
<p>Update the property fields with values stored in dt</p>
</dd>
<dt>utcOffset</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>int utcOffset</b> [config, unit=&#x22;second&#x22;]

</code></p>
<p>Current UTC offset in seconds used to calculate the time&#xa;fields from nanos.  If osUtcOffset is true this is a read-only &#xa;property read from the operating system.  If osUtcOffset is &#xa;false then this is a configuration property.</p>
</dd>
<dt>work</dt>
<dd><p class='sig'><code><em><em>public</em> <em>virtual</em> <em>override</em> </em><b>bool work()</b>

</code></p>
<p>Perform a chunk of background work.  Return true&#xa;is there is pending work or false if the Service is&#xa;done working this cycle.</p>
</dd>
<dt>year</dt>
<dd><p class='sig'><code><em><em>public</em> <em>property</em> </em><b>int year</b>

</code></p>
<p>Year</p>
</dd>
</dl>
<div class='nav'>
  <a href='../index.html'>Index</a> |
  <a href='../api.html'>Kits</a> |
  <a href='index.html'>datetime</a>
</div>
<div class='copyright'>Copyright &#169; 2009, Tridium, Inc.</div>
</body>
</html>
